import scrapy


class BaiduSpider(scrapy.Spider):
    # 每个爬虫的名称 不能重复 用于启动爬虫
    name = 'BaiduSpider'
    # 爬虫所能允许 ”活动的范围“
    allowed_domains = ['baidu.com']
    # 指定爬虫启动的url
    start_urls = ['https://www.baidu.com']

    # 处理响应
    def parse(self, response, **kwargs):
        print(response.text)
